﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
namespace TileEngine
{
    class Global
    {
        public static int gameTime=1200000;
        public static Point tileSize = new Point(20, 20);
        public static World currentWorld;
        public static ContentManager content;
        public static int maxItemCount=400;
        public static Random myRandom = new Random();
        public static void loadTextures(){
            Textures.intro = content.Load<Texture2D>(@"Textures\intro");

            Textures.font1 = content.Load<SpriteFont>("SpriteFont1");
            Textures.font8 = content.Load<SpriteFont>("6Font");
            Textures.font10 = content.Load<SpriteFont>("Font10");
            Textures.font14 = content.Load<SpriteFont>("Font14");
            Textures.font20 = content.Load<SpriteFont>("Font20");
            Textures.font10Bold = content.Load<SpriteFont>("Font10Bold");
            Textures.grass = content.Load<Texture2D>(@"Textures\TileSets\grass");
            Textures.dirt = content.Load<Texture2D>(@"Textures\TileSets\dirt");
            Textures.stone = content.Load<Texture2D>(@"Textures\TileSets\stone");
            Textures.empty = content.Load<Texture2D>(@"Textures\TileSets\empty");
            Textures.tree = content.Load<Texture2D>(@"Textures\TileSets\tree");
            Textures.treeTop = content.Load<Texture2D>(@"Textures\TileSets\treeTop");
            Textures.woodItem = content.Load<Texture2D>(@"Textures\items\woodItem");
            Textures.torch = content.Load<Texture2D>(@"Textures\items\torch");
            Textures.torchItem = content.Load<Texture2D>(@"Textures\items\torchItem");
            Textures.dirtWall = content.Load<Texture2D>(@"Textures\TileSets\walls\dirtWall");

            Textures.adamentine = content.Load<Texture2D>(@"Textures\TileSets\ores\adamentine");
            Textures.boron = content.Load<Texture2D>(@"Textures\TileSets\ores\boron");
            Textures.coal = content.Load<Texture2D>(@"Textures\TileSets\ores\coal");
            Textures.cobalt = content.Load<Texture2D>(@"Textures\TileSets\ores\cobalt");
            Textures.copper = content.Load<Texture2D>(@"Textures\TileSets\ores\copper");
            Textures.crome = content.Load<Texture2D>(@"Textures\TileSets\ores\crome");
            Textures.firestone = content.Load<Texture2D>(@"Textures\TileSets\ores\firestone");
            Textures.godstone = content.Load<Texture2D>(@"Textures\TileSets\ores\godstone");
            Textures.gold = content.Load<Texture2D>(@"Textures\TileSets\ores\gold");
            Textures.iron = content.Load<Texture2D>(@"Textures\TileSets\ores\iron");
            Textures.meteorite = content.Load<Texture2D>(@"Textures\TileSets\ores\meteorite");
            Textures.mithril = content.Load<Texture2D>(@"Textures\TileSets\ores\mithril");
            Textures.nikel = content.Load<Texture2D>(@"Textures\TileSets\ores\nikel");
            Textures.obsidian = content.Load<Texture2D>(@"Textures\TileSets\ores\obsidian");
            Textures.phosphor = content.Load<Texture2D>(@"Textures\TileSets\ores\phosphor");
            Textures.platinum = content.Load<Texture2D>(@"Textures\TileSets\ores\platinum");
            Textures.silver = content.Load<Texture2D>(@"Textures\TileSets\ores\silver");
            Textures.titanium = content.Load<Texture2D>(@"Textures\TileSets\ores\titanium");
            Textures.toxicant = content.Load<Texture2D>(@"Textures\TileSets\ores\toxicant");
            Textures.uranium = content.Load<Texture2D>(@"Textures\TileSets\ores\uranium");
            Textures.xstone = content.Load<Texture2D>(@"Textures\TileSets\ores\xstone");

            Textures.goldItem = content.Load<Texture2D>(@"Textures\items\ores\goldItem");
            Textures.silverItem = content.Load<Texture2D>(@"Textures\items\ores\silverItem");
            Textures.ironItem = content.Load<Texture2D>(@"Textures\items\ores\ironItem");
            Textures.copperItem = content.Load<Texture2D>(@"Textures\items\ores\copperItem");
            Textures.boronItem = content.Load<Texture2D>(@"Textures\items\ores\boronItem");
            Textures.coalItem = content.Load<Texture2D>(@"Textures\items\ores\coalItem");
            Textures.cromeItem = content.Load<Texture2D>(@"Textures\items\ores\cromeItem");
            Textures.nikelItem = content.Load<Texture2D>(@"Textures\items\ores\nikelItem");
            Textures.phosphorItem = content.Load<Texture2D>(@"Textures\items\ores\phosphorItem");
            Textures.cobaltItem = content.Load<Texture2D>(@"Textures\items\ores\cobaltItem");
            Textures.adamentineItem = content.Load<Texture2D>(@"Textures\items\ores\adamentineItem");
            Textures.mithrilItem = content.Load<Texture2D>(@"Textures\items\ores\mithrilItem");
            Textures.platinumItem = content.Load<Texture2D>(@"Textures\items\ores\platinumItem");
            Textures.titaniumItem = content.Load<Texture2D>(@"Textures\items\ores\titaniumItem");

            Textures.bar = content.Load<Texture2D>(@"Textures\bar");
            Textures.healthBar = content.Load<Texture2D>(@"Textures\healthBar");
            Textures.manaBar = content.Load<Texture2D>(@"Textures\manaBar");
            Textures.xpBar = content.Load<Texture2D>(@"Textures\xpBar");
            Textures.addStat = content.Load<Texture2D>(@"Textures\addStat");
            Textures.back = content.Load<Texture2D>(@"Textures\back");


            Textures.itemHolder = content.Load<Texture2D>(@"Textures\itemHolder");
            Textures.sun = content.Load<Texture2D>(@"Textures\background\sun");
            Textures.moon = content.Load<Texture2D>(@"Textures\background\moon");
            Textures.pickaxe = content.Load<Texture2D>(@"Textures\items\pickaxe");
            Textures.dirtItem = content.Load<Texture2D>(@"Textures\items\dirtItem");
            Textures.stoneItem = content.Load<Texture2D>(@"Textures\items\stoneItem");
            Textures.player = content.Load<Texture2D>(@"Textures\player\defaultPlayer");


            for (int i = 0; i < 15; i++)
                Textures.cloud.Add(content.Load<Texture2D>(@"Textures\background\clouds\cl" + i));

            for (int i = 0; i < 3; i++)
                Textures.liquid.Add(content.Load<Texture2D>(@"Textures\liquids\liquid" + i));

        }
    }
    public class Textures
    {
        public static Texture2D intro;

        public static SpriteFont font1;
        public static SpriteFont font8;
        public static SpriteFont font10;
        public static SpriteFont font14;
        public static SpriteFont font20;
        public static SpriteFont font10Bold;

        public static Texture2D stone;
        public static Texture2D dirt;
        public static Texture2D empty;
        public static Texture2D grass;
        public static Texture2D tree;
        public static Texture2D woodItem;
        public static Texture2D treeTop;
        public static Texture2D torch;
        public static Texture2D torchItem;
        #region ores
        public static Texture2D adamentine;
        public static Texture2D boron;
        public static Texture2D coal;
        public static Texture2D cobalt;
        public static Texture2D copper;
        public static Texture2D crome;
        public static Texture2D firestone;
        public static Texture2D godstone;
        public static Texture2D gold;
        public static Texture2D iron;
        public static Texture2D meteorite;
        public static Texture2D mithril;
        public static Texture2D nikel;
        public static Texture2D obsidian;
        public static Texture2D phosphor;
        public static Texture2D platinum;
        public static Texture2D silver;
        public static Texture2D titanium;
        public static Texture2D toxicant;
        public static Texture2D uranium;
        public static Texture2D xstone;
        #endregion
        #region oreItems
        public static Texture2D goldItem;
        public static Texture2D silverItem;
        public static Texture2D ironItem;
        public static Texture2D copperItem;
        public static Texture2D boronItem;
        public static Texture2D coalItem;
        public static Texture2D cromeItem;
        public static Texture2D nikelItem;
        public static Texture2D phosphorItem;
        public static Texture2D cobaltItem;
        public static Texture2D adamentineItem;
        public static Texture2D mithrilItem;
        public static Texture2D titaniumItem;
        public static Texture2D platinumItem;
        #endregion

        public static Texture2D bar;
        public static Texture2D healthBar;
        public static Texture2D manaBar;
        public static Texture2D xpBar;
        public static Texture2D addStat;
        public static Texture2D back;

        public static Texture2D itemHolder;
        public static Texture2D sun;
        public static Texture2D moon;
        public static Texture2D pickaxe;
        public static Texture2D dirtItem;
        public static Texture2D stoneItem;

        public static Texture2D player;

        public static List<Texture2D> liquid = new List<Texture2D>();

        public static List<Texture2D> cloud = new List<Texture2D>();

        public static Texture2D dirtWall;
   
    }
}
